package com.hj.homework;

public class Apple {
    private int big;
    private String color;

    public Apple() {
    }

    public Apple(int big, String color) {
        this.big = big;
        this.color = color;
    }

    public int getBig() {
        return big;
    }

    public void setBig(int big) {
        this.big = big;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Apple apple = (Apple) o;

        if (big != apple.big) return false;
        return color != null ? color.equals(apple.color) : apple.color == null;
    }

    @Override
    public int hashCode() {
        int result = big;
        result = 31 * result + (color != null ? color.hashCode() : 0);
        return result;
    }
}
